package com.itrus.util;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.StringTokenizer;

public class PathList
{
  public static String appendPath(String paramString1, String paramString2)
  {
    if ((paramString1 == null) || (paramString1.length() == 0))
      paramString1 = paramString2;
    while ((paramString2 == null) || (paramString2.length() == 0))
      return paramString1;
    return paramString1 + File.pathSeparator + paramString2;
  }

  private static URL fileToURL(File paramFile)
  {
    try
    {
      String str3 = paramFile.getCanonicalPath();
      str1 = str3;
      str2 = str1.replace(File.separatorChar, '/');
      if (!str2.startsWith("/"))
        str2 = "/" + str2;
      if (!paramFile.isFile())
        str2 = str2 + "/";
    }
    catch (IOException localIOException)
    {
      try
      {
        String str2;
        URL localURL = new URL("file", "", str2);
        return localURL;
        localIOException = localIOException;
        String str1 = paramFile.getAbsolutePath();
      }
      catch (MalformedURLException localMalformedURLException)
      {
      }
    }
    throw new IllegalArgumentException("file");
  }

  public static URL[] pathToURLs(String paramString)
  {
    StringTokenizer localStringTokenizer = new StringTokenizer(paramString, File.pathSeparator);
    Object localObject = new URL[localStringTokenizer.countTokens()];
    int i = 0;
    while (true)
    {
      if (!localStringTokenizer.hasMoreTokens())
      {
        if (localObject.length != i)
        {
          URL[] arrayOfURL = new URL[i];
          System.arraycopy(localObject, 0, arrayOfURL, 0, i);
          localObject = arrayOfURL;
        }
        return localObject;
      }
      URL localURL = fileToURL(new File(localStringTokenizer.nextToken()));
      if (localURL != null)
      {
        int j = i + 1;
        localObject[i] = localURL;
        i = j;
      }
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.itrus.util.PathList
 * JD-Core Version:    0.6.2
 */